import requests

#url = "https://stock.oksdb.com/futuresquota/getCacheData"
#data = {"futuresType":"CL"}
#ret =requests.post(url,data)
#print(ret.text)

#url = "https://stock.oksdb.com/futuresquota/getFstData"
#ret =requests.post(url,data)
#print(ret.text)

datamd5 = "http://www.1cai.net/secure/Md5Code.do"
ret1 = requests.post(datamd5)
print(ret1.text)



url = "http://www.1cai.net/secure/login.do?method=webentry"
parm = {'webenter':'4d10eb80d4ab463845aff2ce4b57eda7e020be9994b333f10bb3b3d3ccfdc717a6ec8dd81abbc65344da7212862548e5b43e81c2f4aaa870ec8e7596fa16be703621c96539856f7430b7c45b763cf41cd82053f0aefe1740ce7b084655848f443abf20aeab49293be25b9fab4ba68ce08109e2b3baabe8acc7c7e26194481f58'}
headers = {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
           'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393'}

ret = requests.post("http://www.1cai.net/secure/Md5Code.do")
import hashlib
strpwd = "woddle<a>woogle31799800"
md5=hashlib.md5(strpwd.encode()).hexdigest()
print(md5)
#parm = {'webenter':md5}
ret = requests.post(url, data = parm, headers=headers,cookies=ret.cookies)
print(ret.text)

urlquery = "http://www.1cai.net/secure/index.do?method=findMenu"
fd = requests.get(urlquery, headers=headers,cookies=ret.cookies)

print(fd.text)
print(fd.cookies)






